<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStafferTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('staffer', function (Blueprint $table) {
            $table->increments('id');
            $table->string('staffer_name')->index()->comment('员工姓名');
            $table->string('staffer_phone', 11)->index()->comment('员工手机号');
            $table->string('staffer_password')->comment('员工密码');
            $table->unsignedTinyInteger('sex')->default(0)->comment('员工性别');
            $table->timestamps();
            $table->softDeletes();
            $table->engine = "InnoDB";
            $table->charset = "utf8mb4";
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('staffer');
    }
}
